<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of AbstractDao
 *
 * @author virtual
 */
abstract class AbstractDao {
    protected $mysqli;
    
     public function __construct(){
        //echo "construct";
        $this->mysqli = new mysqli('localhost', 'root', 'password', 'ukkepuk');
        if($this->mysqli->connect_error){
            die('Connect Error (' . $this->mysqli->connec_errno . ') ' . $mysqli->connect_error);
        }

        if (mysqli_connect_error()) {
            die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error());
        }

    }
    public function __destruct(){
        //echo "destruct";
        $this->mysqli->close();
    }
   

}

?>
